Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change captions to use <figure> and <figcaption> #1321

Open
wants to merge 1 commit into
base: 2
Choose a base branch
from

Conversation

kinglozzer
Copy link
Member

Notes:

  • Hitting return when editing a <figcaption> will result in a new <figcaption> being created, rather than a new paragraph outside of the <figure>. The same issue already exists in v4 - editing a caption and hitting return will add another <p class="caption"> instead of breaking out of the containing div. On save, they both get concatenated into a single caption though.
  • The embed with caption is a <figure> in TinyMCE, but not when the shortcode is rendered. That’ll need a separate PR to framework to update the shortcode template
  • I wasn’t sure whether the changes to extended_valid_elements should be made here or in framework
  • I also wasn’t sure if an embed without a caption should still be wrapped in a <figure> instead of a <div> like it currently is. I kept it as a <div>, but it might be better to just always use a <figure> so it’s a predictable element. Apparently a figure without a figcaption is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants